home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 May: Tool Chest / Dev.CD May 98 TC.toast / Tool Chest / Testing & Debugging / Virtual User tools / SPEC S&L v.1.0.1 / Scripts / Quicken.vu < prev    next >
Encoding:
Text File  |  1993-12-17  |  9.7 KB  |  297 lines  |  [TEXT/MPS ]

  1. #
  2. # ****************************************************************************
  3. #
  4. #    File Name:        Quicken.vu
  5. #
  6. #    Contains:    Quick look test script for Quicken version 3.0
  7. #
  8. #    Written by:    Kevin Avoy, Ken Landreth, Michael Leong, Gil Spencer et al
  9. #
  10. #    Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  11. #
  12. # ****************************************************************************
  13. #            C h a n g e        H i s t o r y (most recent first):
  14. # ****************************************************************************
  15. #
  16. #        Vers      Date        Author        Description
  17. #        ----    --------    ------    ---------------------------------------------
  18. #     <1.0.7>    12/14/93    KTA        Dealt with some problems that happen when running script for the
  19. #                                    first time.
  20. #     <1.0.6>    12/13/93    KTA        Changed call to DoSetUpApp() 1st paramter from 'No' to 'Cancel'
  21. #     <1.0.5>     9/30/93    KTA        Initialize gFileName prior to gApptitle being updated by
  22. #                                    launchTwitch().
  23. #     <1.0.2>     6/16/93    NAGA        Renaming InitGlobals(ScriptLevel)to InitGlobals(ScriptLevel)
  24. #        <1+>     5/25/93    NAGA        Adding header and porting old files to follow new standards
  25. #
  26. # ****************************************************************************
  27. #
  28.  
  29.  
  30.  
  31. ########################################################################
  32. #                            External libraries 
  33. #=======================================================================
  34. Libraries "Output.Lib", "DoTasks.Lib","Draw.Lib","StandardFile.Lib","DA.Lib","UserInterface.Lib", "Font.Lib", "Globals.Lib", "LaunchQuit.Lib", "TCS.Lib";
  35.  
  36.  
  37. #########################################################################
  38. ########               Application Specific Tasks
  39. #########################################################################
  40.  
  41. #########################################################################
  42. #                            doReport(reportName,section)
  43. #========================================================================
  44. # Author:        Jon Marsh x2 8093
  45. # Description:    Display report, close windows
  46. # Parameters:    reportName: menuItem name
  47. #                section:  "open","close","both"
  48. # Returns:        Nothing
  49. # Examples:        doReport("Income & Expense", "open");
  50. # Assumptions:    All other windows are closed. 
  51. # Applications:        Quicken
  52. #========================================================================
  53. # History:
  54. #
  55. ########################################################################
  56. task doReport(reportName,section:= "both") begin
  57.     if section <> "close" begin
  58.         SelectMenuItem(reportName, "Business", "Reports");
  59.         wait(1);
  60.         SelectButton('OK');
  61.     end;
  62.     wait(3);
  63.     if section <> "open" begin
  64.         close [window o:1 t:?title c:true]!; # CloseWindow has some trouble
  65.         LogStr("Selected the close box on window titled '{title}'");
  66.         close [window o:1 t:?title c:true]!;
  67.         LogStr("Selected the close box on window titled '{title}'");
  68.     end;
  69. end;
  70.  
  71.  
  72. #########################################################################
  73. #                            Views()
  74. #========================================================================
  75. # Author:        Jon Marsh x2 8093
  76. # Description:    Change views.
  77. # Parameters:    None
  78. # Returns:        Nothing
  79. # Examples:        Views();
  80. # Assumptions:    None 
  81. # Applications:        Quicken
  82. #========================================================================
  83. # History:
  84. #
  85. ########################################################################
  86. task Views() begin
  87.     LogStr( "Changing Views");
  88.     doReport("A/P by Vendor");
  89.     doReport("Balance Sheet");
  90.     doReport("Cash Flow");
  91.     doReport("Income Statement");
  92.     doReport("Itemized Categories");
  93.     doReport("Job/Project");
  94.     doReport("Reconciliation");
  95.     doReport("Transaction Summary");
  96.     doReport("Transaction Detail");
  97.  
  98.     SelectMenuItem("Category & Transfer List", "ShortCuts");
  99.     CloseWindow(,,1);
  100.     SelectMenuItem("BillMinder", "Options");
  101.     CloseWindow(,,1);
  102.     SelectMenuItem("Account List", "Accounts");
  103.     CloseWindow(,,1);
  104. end;
  105.  
  106. #########################################################################
  107. #                            QuickenCategories()
  108. #========================================================================
  109. # Author:        Jon Marsh x2 8093
  110. # Description:    Set up some Categories
  111. # Parameters:    None
  112. # Returns:        Nothing
  113. # Examples:        QuickenCategories();
  114. # Assumptions:    None 
  115. # Applications:        Quicken
  116. #========================================================================
  117. # History:
  118. #
  119. ########################################################################
  120. task QuickenCategories() begin
  121.     LogStr( "Setting up Categories...");
  122.     SelectMenuItem("Set Up Categories", "ShortCuts");    #To set up new categories
  123.     
  124.     TypeList({"Cash Bonus","For outstanding work"},2);
  125.     SpecialKey(enterKey, 'Enter Key');                    #To go to next card
  126.  
  127.     TypeList({"Incentives","Carrots/Sticks"},2);
  128.     SpecialKey(enterKey, 'Enter Key');                    #To go to next card
  129.  
  130.     TypeList({"Bribes","Overseas work?","",""},2);
  131.     ScrapBook(global kScrapTEXT);                        #Paste some text into desc.
  132.     SpecialKey(enterKey, 'Enter Key');                    #To finish setting up categories
  133.  
  134.     CloseWindow(,,1);
  135. end;
  136.  
  137. #########################################################################
  138. #                            QuickenDeposits()
  139. #========================================================================
  140. # Author:        Jon Marsh x2 8093
  141. # Description:    Deposit some income
  142. # Parameters:    None
  143. # Returns:        Nothing
  144. # Examples:        QuickenDeposits();
  145. # Assumptions:    None 
  146. # Applications:        Quicken
  147. #========================================================================
  148. # History:
  149. #
  150. ########################################################################
  151. task QuickenDeposits() begin
  152.     LogStr( "Making Deposits...");
  153.     SelectMenuItem("Register", "Account");    #To add a deposit to account
  154.  
  155.     TypeList({    "", "", "Sales", "", "100000",
  156.                 "A good day at the store!", "Gross Sales"
  157.                     }, 2);
  158.     SpecialKey(enterKey, "Enter Key");            #To enter item and go to next card
  159.  
  160.     TypeList({    "", "", "Found on Street", "", "10000",
  161.                 "Lucky Me!", "Interest Earned"
  162.                     }, 2);
  163.     SpecialKey(enterKey, "Enter Key");            #To enter item and go to next card
  164.  
  165. end;
  166.  
  167. #########################################################################
  168. #                            QuickenChecks()
  169. #========================================================================
  170. # Author:        Jon Marsh x2 8093
  171. # Description:    Write some sample checks
  172. # Parameters:    None
  173. # Returns:        None
  174. # Examples:        QuickenChecks();
  175. # Assumptions:    None 
  176. # Applications:        Quicken
  177. #========================================================================
  178. # History:
  179. #
  180. ########################################################################
  181. task QuickenChecks() begin
  182.     LogStr( "Writing checks...");
  183.     SelectMenuItem("Write Checks", "Accounts");    #To write a check to account
  184.     
  185.     #To write a check!
  186.     TypeList({    "",
  187.                 "Sandy Tompkins",    "1000",
  188.                 "746 SandyKins Ln.",
  189.                 "Santa Cruz, CA",
  190.                 "  94758",
  191.                 "  USA",
  192.                 "",
  193.                 "Because she deserves it!",
  194.                 "Benefits"    }, 2);
  195.     SpecialKey(enterKey, "Enter Key");                #To go to next check
  196.     
  197.     TypeList({    "",
  198.                 "Joe the Janitor",    "10000",
  199.                 "8475 Long Road",
  200.                 "Homeville, CO",
  201.                 "  48957",
  202.                 "",
  203.                 "Bonus!"    }, 2);
  204.                 
  205.                 SelectMenuItem("Edit Splits", "Edit");
  206.     TypeList({    "(Waste of money)", "Benefits", "2000",
  207.                 "(More Like It!)", "Janitorial"    }, 2);
  208.     SpecialKey(enterKey, "Enter Key");                #To go to next check
  209.     SelectMenuItem("Close Splits", "Edit");
  210.  
  211.     TypeList({    "",
  212.                 "Big Bang Team",    "20000",
  213.                 "Cupertino Somewhere",
  214.                 "",
  215.                 "Because we're great!",
  216.                 "Incentives" }, 2);
  217.     SpecialKey(enterKey, "Enter Key");                #To go to next check
  218.  
  219.     CloseWindow(,,1);                                    #To dismiss dialog box
  220. end;
  221.  
  222. ################################################################################
  223. ####################             Main Script                    ####################
  224. ################################################################################
  225. script Quicken (ScriptLevel:= -1)
  226. begin
  227.     InitGlobals(ScriptLevel);
  228.     InitDraw();
  229.     InitFonts();
  230.     global gAppTitle := 'Quicken';
  231.     global gAppVersion := '3';        # version of app you will be running
  232.     global gFileName := "@!@-{gBuildVers}-{gAppTitle}";    #This is used in SaveAs when saving files
  233.     SuiteStart('Quicken.vu');                    # begin a new test suite
  234.     if LaunchTwitch("{gAppTitle}",gAliasDirectory) # launch or twitch to your app
  235.     begin
  236.         gCustomRetrievedDoc := [window o:1 t:'First InterBank: Register'];
  237.         (*
  238.         *)
  239.         If (match[button t:'Cancel']!)
  240.             SelectButton('Cancel');
  241.         SelectMenuItem('New', 'File');
  242.         if(match[checkbox t:'Home']!)            # Check to see if this is the 1st run
  243.         begin
  244.             SaveAs(gFileName);                            #To test SF_Put
  245.             wait(2);
  246.             SelectButton('Cancel');
  247.         end;
  248.         DoSetUpApp('Cancel',0,,'New File',,,0);    
  249.         
  250.         SelectCheckBox("Home");
  251.         SelectCheckBox("Business");
  252.         SaveAs(gFileName);                            #To test SF_Put
  253.         ourLastSavedFile := global gLastSavedFile;
  254.         wait(10);
  255.         
  256.         TypeList({"First InterBank", "10000"},2);    #Set up new Account
  257.         SpecialKey(returnKey, 'Return Key');        #To Select the Default-'Continue'
  258.         
  259.         CloseWindow();                                   #To test the Close box - only closes window
  260.         SelectMenuItem("New", "File");                # Close this doc by creating a new one.
  261.         SelectButton("New File");
  262.         SelectCheckBox("Home");
  263.         SaveAs("@!@-QuickenJunk");
  264.         wait(5);
  265.         SelectButton("Cancel");
  266.         
  267.         OpenFile(ourLastSavedFile);                    #To Test SF_Get will open file 
  268.         
  269.         QuickenCategories();                        # Includes ScrapText
  270.         QuickenDeposits();
  271.     
  272.         QuickenChecks();
  273.         
  274.         doReport("Transaction Detail", "open");        #To go to a scrollable window
  275.     
  276.         DoWindow();
  277.         
  278.         doReport("Transaction Detail", "close");
  279.         
  280.         Views();                                    # Change views
  281.         
  282.         SelectMenuItem("Save A Copy", "File");
  283.         SelectButton("OK");
  284.         SaveAs(gFileName,0);
  285.                     
  286.         DoCloseApp(-1,1,,,1);
  287.         
  288.         LogStr("############################# LIMITATIONS: ############################");
  289.         LogStr("Note: No Graphic Tools to test in Quicken");
  290.         LogStr("Note: No Font Menus to test in Quicken");
  291.         LogStr("Note: Quicken does not accept graphic from scrapbook");
  292.         LogStr("Note: Quicken does not have a revert function");
  293.         
  294.     end; # if LaunchTwitch("{gAppTitle}",gAliasDirectory)
  295.     SuiteEnd();
  296. end; # script Quicken
  297.